/*
*Author 		Gina Maya Purnama
*DateCreated	5 April 2011
*DateModified	6 April
*Version		1.1
*/

package jtk.project4.fleet.field;

import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.LayoutManager;

import nl.coderight.jazz.form.FormField;
import nl.coderight.jazz.form.FormLayout;
import nl.coderight.jazz.form.FormLayout.Resize;
import nl.coderight.jazz.form.control.CalendarControl;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.field.ComboField;
import nl.coderight.jazz.form.field.MemoField;
import nl.coderight.jazz.form.field.NumberField;
import nl.coderight.jazz.form.field.SelectField;
import nl.coderight.jazz.form.field.TextField;
import nl.coderight.jazz.form.field.button.PushButton;

public class TombolPhotoAccidentField extends GroupControl{
	private PushButton addImageButton;
	private PushButton deleteImageButton;
	private PushButton viewImageButton;
	

	public TombolPhotoAccidentField(String bindID){
		setBindID(bindID);
		createFields();
		createLayout();
	}

	private void createFields() {
		// TODO Auto-generated method stub
		addImageButton = new PushButton("addImageButton");
		deleteImageButton = new PushButton("deleteImageButton");
		viewImageButton = new PushButton("viewImageButton");
	}
	
	private void createLayout() {
		// TODO Auto-generated method stub
		addField(createForm());
	}
	
	private GroupControl createButtons(){
		GroupControl button = new GroupControl();
		button.setLayout ((LayoutManager) new FlowLayout(FlowLayout.RIGHT));
		button.addField(addImageButton);
		button.addField(deleteImageButton);
		button.addField(viewImageButton);
		return button;
		
	}
	
	private FormField createForm(){
		GroupControl form= new GroupControl();
		form.addField(createButtons(),EAST);
		return form;
		
	}
}
